
public class Car {

		private String vinnumber;
		private String color;
		private int maximumspeed;
		private boolean started;
		private int currentgear=1;
		
		//constructor
		Car(String vinnumber)
		{
		this.vinnumber=vinnumber;
			
		}
		
		Car (String vinnumber,String color)
		{
			this.vinnumber=vinnumber;
			this.color=color;
		}
		
		Car (String vinnumber,String color,int maximumspeed)
		{
			this.vinnumber=vinnumber;
			this.color=color;
			this.maximumspeed=maximumspeed;
		}
		
		void start()
		{
			System.out.println("Car is Starting");
			started=true;
			
		}
		void switchgear(int newgear)
		{
			if(newgear>6)
			{
				currentgear=6;
			}
			else
			{
				currentgear=newgear;
			}
		}
		
		void setcolor(String color)
		{
			this.color=color;
		}
		
		String getcolor()
		{
			return color;
		}
		void printInfo()
		{
			System.out.println("Vin = " + vinnumber);
			System.out.println("Color = " + color);
			System.out.println("Started = " + started);
			System.out.println("Speed = "+maximumspeed);
			System.out.println("Current Gear = " + currentgear);
		}
}
